﻿@using TinyMoocSite.ViewModels
@model UpdateProblemForm

@{
    ViewBag.Title = "修改题目内容";
    Layout = "~/Views/Student/CoursePageLayout.cshtml";
}


@section Homework { active }

@section ExtensionStyle
{
    <link href="~/Content/simditor.css" rel="stylesheet" />
}

@section ExtensionScript
{
    <script src="~/Scripts/module.min.js"></script>
    <script src="~/Scripts/hotkeys.min.js"></script>
    <script src="~/Scripts/uploader.min.js"></script>
    <script src="~/Scripts/simditor.min.js"></script>


    <script>
        var editor = new Simditor({
            textarea: $('#form-body')
            // optional options
        });
    </script>
}

@section RightContainer
{
    <h4>作业管理&raquo;修改题目内容</h4><hr />
    <form role="form" action="/Teacher/DoUpdateProblem" method="post" enctype="multipart/form-data" class="update-form form-horizontal">
        <input type="hidden" name="Id" class="form-control" id="form-id" value="@Model.Id">
        <input type="hidden" name="HomeworkId" class="form-control" id="form-id" value="@Model.HomeworkId">

        <div class="form-group">
            <label for="form-problem-id" class="col-sm-2 control-label">问题编号</label>
            <div class="col-sm-10">
                <input type="text" name="ProblemId" class="form-control" id="form-problem-id" value="@Model.ProblemId" readonly>
            </div>
        </div>

        <div class="form-group">
            <label for="form-body" class="col-sm-2 control-label">题目描述</label>
            <div class="col-sm-10">
                <textarea name="Body" class="form-control" id="form-body" rows="15">@Model.Body</textarea>
            </div>
        </div>

        <div class="form-group">
            <label for="form-first" class="col-sm-2 control-label">选项 A</label>
            <div class="col-sm-10">
                <input type="text" name="CandidateFirst" class="form-control" id="form-first" value="@Model.CandidateFirst">
            </div>
        </div>

        <div class="form-group">
            <label for="form-second" class="col-sm-2 control-label">选项 B</label>
            <div class="col-sm-10">
                <input type="text" name="CandidateSecond" class="form-control" id="form-second" value="@Model.CandidateSecond">
            </div>
        </div>

        <div class="form-group">
            <label for="form-third" class="col-sm-2 control-label">选项 C</label>
            <div class="col-sm-10">
                <input type="text" name="CandidateThird" class="form-control" id="form-third" value="@Model.CandidateThird">
            </div>
        </div>

        <div class="form-group">
            <label for="form-fourth" class="col-sm-2 control-label">选项 D</label>
            <div class="col-sm-10">
                <input type="text" name="CandidateFourth" class="form-control" id="form-fourth" value="@Model.CandidateFourth">
            </div>
        </div>

        <div class="form-group">
            <label for="form-answer" class="col-sm-2 control-label">正确答案</label>
            <div class="col-sm-10">
                <input type="text" name="CorrectAnswer" class="form-control" id="form-answer" value="@Model.CorrectAnswer">
            </div>
        </div>

        <br /><br />
        <div class="text-center">
            <button type="submit" class="btn btn-default">创建</button>
            &nbsp;&nbsp;
            <button type="button" class="btn btn-default" onclick="history.back();">返回</button>
        </div>
        <br /><br />
    </form>
}

